<template>
  <div ref="canvas"></div>
</template>
<script>
import BpmnModeler from 'bpmn-js/lib/Modeler';
export default {
  mounted() {
    const container = this.$refs.canvas;
    this.modeler = new BpmnModeler({container});
    this.modeler.importXML(xml, err => {
      if (err) {
        console.error(err);
      }
    });
  },  beforeUnmount() {
    this.modeler.destroy();
  }};
</script>
